package com.itheima.idea;

import java.util.Scanner;

public class Test2Arr {
    public static void main(String[] args) {
            int[] arr = new int[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            System.out.println("第"+(i+1)+"次输入");
           int num = sc.nextInt();
            if(num > 100 || num < 50){
                i--;
            }else{
                arr[i] = num;
            }
        }

        }
    }

